package com.tanguy.user.bean;

/**
 * Created by dab on 2017/11/8 0008 17:16
 */

public class User {

    /**
     * balance : 0
     * num : 0
     * phone : 18728056685
     * autograph : 无
     * headImg : 123
     * isread : 1
     * type : 1
     * msg : 登陆成功
     * userId : 1
     * name : 萨达
     * sex : 1
     * state : 1
     */

    private double balance;
    private int num;
    private String phone;
    private String autograph;
    private String headImg;
    private int isread;
    private int type;
    private String msg;
    private int userId;
    private String name;
    private String servicephone;
    private int sex;
    private int state;

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAutograph() {
        return autograph;
    }

    public void setAutograph(String autograph) {
        this.autograph = autograph;
    }

    public String getHeadImg() {
        return headImg;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg;
    }

    public int getIsread() {
        return isread;
    }

    public void setIsread(int isread) {
        this.isread = isread;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSex() {
        return sex;
    }

    public String getSexString() {
        return sex == 1 ? "男" : "女";
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public void setSex(String sex) {
        this.sex = "男".equals(sex) ? 1 : 2;
    }

    public int getSexByString(String sex) {
        return "男".equals(sex) ? 1 : 2;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getServicephone() {
        return servicephone;
    }

    public void setServicephone(String servicephone) {
        this.servicephone = servicephone;
    }

    @Override
    public String toString() {
        return "User{" +
                "balance=" + balance +
                ", num=" + num +
                ", phone='" + phone + '\'' +
                ", autograph='" + autograph + '\'' +
                ", headImg='" + headImg + '\'' +
                ", isread=" + isread +
                ", type=" + type +
                ", msg='" + msg + '\'' +
                ", userId=" + userId +
                ", name='" + name + '\'' +
                ", servicephone='" + servicephone + '\'' +
                ", sex=" + sex +
                ", state=" + state +
                '}';
    }
}
